

void UI_RoundOptions::destroy() {
    PF_SETTINGS->beginGroup("/Modify");
    PF_SETTINGS->writeEntry("/RoundRadius", leRadius->text());
    PF_SETTINGS->writeEntry("/RoundTrim", (int)cbTrim->isChecked());
    PF_SETTINGS->endGroup();
}

void UI_RoundOptions::setAction(PF_ActionInterface* a, bool update) {
    if (a!=NULL && a->rtti()==LX_Define::ActionModifyRound) {
        action = (WF_ModifyRound*)a;

        QString sr;
	QString st;
        if (update) {
            sr = QString("%1").arg(action->getRadius());
            st = QString("%1").arg((int)action->isTrimOn());
        } else {
            PF_SETTINGS->beginGroup("/Modify");
            sr = PF_SETTINGS->readEntry("/RoundRadius", "1.0");
            st = PF_SETTINGS->readEntry("/RoundTrim", "1");
            PF_SETTINGS->endGroup();
        }
	leRadius->setText(sr);
    	cbTrim->setChecked(st=="1");
    } else {
        PF_DEBUG->print(PF_Debug::D_ERROR, 
			"UI_LineParallelOptions::setAction: wrong action type");
        action = NULL;
    }
}


void UI_RoundOptions::updateData() {
    if (action!=NULL) {
        action->setTrim(cbTrim->isChecked());
        action->setRadius(PF_Math::eval(leRadius->text()));
    }
}
